; Disassembly of the file "D:\Game Tech\Test Equipment\Fluke\Z80-AA\540351R1.1"
; 
; CPU Type: Z80
; 
; Created with dZ80 1.50
; 
; on Thursday, 07 of March 2002 at 12:13 AM
; 
0000 318010    ld      sp,$1080
0003 c3c902    jp      $02c9
0006 3a0910    ld      a,($1009)
0009 4f        ld      c,a
000a 3a0030    ld      a,($3000)
000d a9        xor     c
000e 6f        ld      l,a
000f 3a0110    ld      a,($1001)
0012 b5        or      l
0013 320110    ld      ($1001),a
0016 3a0810    ld      a,($1008)
0019 4f        ld      c,a
001a 3a0060    ld      a,($6000)
001d a9        xor     c
001e 6f        ld      l,a
001f 3a0010    ld      a,($1000)
0022 b5        or      l
0023 320010    ld      ($1000),a
0026 c9        ret     

0027 00        nop     
0028 08        ex      af,af'
0029 04        inc     b
002a 0c        inc     c
002b 02        ld      (bc),a
002c 0a        ld      a,(bc)
002d 060e      ld      b,$0e
002f 010905    ld      bc,$0509
0032 0d        dec     c
0033 03        inc     bc
0034 0b        dec     bc
0035 07        rlca    
0036 0f        rrca    
0037 3a0050    ld      a,($5000)
003a ad        xor     l
003b 4f        ld      c,a
003c 97        sub     a
003d 47        ld      b,a
003e c5        push    bc
003f c5        push    bc
0040 210400    ld      hl,$0004
0043 e5        push    hl
0044 cd4506    call    $0645
0047 e1        pop     hl
0048 012700    ld      bc,$0027
004b 09        add     hl,bc
004c c1        pop     bc
004d 79        ld      a,c
004e 87        add     a,a
004f 87        add     a,a
0050 87        add     a,a
0051 87        add     a,a
0052 b6        or      (hl)
0053 4f        ld      c,a
0054 3a1310    ld      a,($1013)
0057 b1        or      c
0058 321310    ld      ($1013),a
005b c9        ret     

005c 3a0d10    ld      a,($100d)
005f 4f        ld      c,a
0060 3a0040    ld      a,($4000)
0063 a9        xor     c
0064 6f        ld      l,a
0065 3a0610    ld      a,($1006)
0068 b5        or      l
0069 320610    ld      ($1006),a
006c c9        ret     

006d 3a8210    ld      a,($1082)
0070 e680      and     $80
0072 20f9      jr      nz,$006d         ; (-$07)
0074 3a8210    ld      a,($1082)
0077 e680      and     $80
0079 20f2      jr      nz,$006d         ; (-$0e)
007b 3a8010    ld      a,($1080)
007e 77        ld      (hl),a
007f 3a8210    ld      a,($1082)
0082 e6bf      and     $bf
0084 328210    ld      ($1082),a
0087 3a8210    ld      a,($1082)
008a e680      and     $80
008c 28f9      jr      z,$0087          ; (-$07)
008e 3a8210    ld      a,($1082)
0091 e680      and     $80
0093 28f2      jr      z,$0087          ; (-$0e)
0095 3a8210    ld      a,($1082)
0098 f640      or      $40
009a 328210    ld      ($1082),a
009d c9        ret     

009e 3a0070    ld      a,($7000)
00a1 320f10    ld      ($100f),a
00a4 2f        cpl     
00a5 57        ld      d,a
00a6 2a0010    ld      hl,($1000)
00a9 220210    ld      ($1002),hl
00ac 97        sub     a
00ad 320010    ld      ($1000),a
00b0 320110    ld      ($1001),a
00b3 3a1310    ld      a,($1013)
00b6 321410    ld      ($1014),a
00b9 97        sub     a
00ba 321310    ld      ($1013),a
00bd 3a0610    ld      a,($1006)
00c0 320710    ld      ($1007),a
00c3 97        sub     a
00c4 320610    ld      ($1006),a
00c7 3a0710    ld      a,($1007)
00ca b7        or      a
00cb 2804      jr      z,$00d1          ; (+$04)
00cd 0e01      ld      c,$01
00cf 1802      jr      $00d3            ; (+$02)
00d1 0e00      ld      c,$00
00d3 69        ld      l,c
00d4 3a1010    ld      a,($1010)
00d7 4f        ld      c,a
00d8 b5        or      l
00d9 6f        ld      l,a
00da e5        push    hl
00db 210210    ld      hl,$1002
00de 7e        ld      a,(hl)
00df 23        inc     hl
00e0 b6        or      (hl)
00e1 2804      jr      z,$00e7          ; (+$04)
00e3 0e02      ld      c,$02
00e5 1802      jr      $00e9            ; (+$02)
00e7 0e00      ld      c,$00
00e9 e1        pop     hl
00ea 7d        ld      a,l
00eb b1        or      c
00ec 6f        ld      l,a
00ed e5        push    hl
00ee 3a1410    ld      a,($1014)
00f1 b7        or      a
00f2 2804      jr      z,$00f8          ; (+$04)
00f4 0e04      ld      c,$04
00f6 1802      jr      $00fa            ; (+$02)
00f8 0e00      ld      c,$00
00fa e1        pop     hl
00fb 7d        ld      a,l
00fc b1        or      c
00fd 6f        ld      l,a
00fe e5        push    hl
00ff 7a        ld      a,d
0100 e613      and     $13
0102 6f        ld      l,a
0103 3a1510    ld      a,($1015)
0106 4f        ld      c,a
0107 a5        and     l
0108 2804      jr      z,$010e          ; (+$04)
010a 0e08      ld      c,$08
010c 1802      jr      $0110            ; (+$02)
010e 0e00      ld      c,$00
0110 e1        pop     hl
0111 7d        ld      a,l
0112 b1        or      c
0113 6f        ld      l,a
0114 e5        push    hl
0115 7a        ld      a,d
0116 e60c      and     $0c
0118 2804      jr      z,$011e          ; (+$04)
011a 0e10      ld      c,$10
011c 1802      jr      $0120            ; (+$02)
011e 0e00      ld      c,$00
0120 e1        pop     hl
0121 7d        ld      a,l
0122 b1        or      c
0123 6f        ld      l,a
0124 7a        ld      a,d
0125 e640      and     $40
0127 4f        ld      c,a
0128 b5        or      l
0129 6f        ld      l,a
012a 3a0f10    ld      a,($100f)
012d e680      and     $80
012f 4f        ld      c,a
0130 b5        or      l
0131 6f        ld      l,a
0132 cd3a01    call    $013a
0135 97        sub     a
0136 321010    ld      ($1010),a
0139 c9        ret     

013a 3a8210    ld      a,($1082)
013d e680      and     $80
013f 20f9      jr      nz,$013a         ; (-$07)
0141 3a8210    ld      a,($1082)
0144 e680      and     $80
0146 20f2      jr      nz,$013a         ; (-$0e)
0148 3eff      ld      a,$ff
014a 328110    ld      ($1081),a
014d 7d        ld      a,l
014e 328010    ld      ($1080),a
0151 3a8210    ld      a,($1082)
0154 e6bf      and     $bf
0156 328210    ld      ($1082),a
0159 3a8210    ld      a,($1082)
015c e680      and     $80
015e 28f9      jr      z,$0159          ; (-$07)
0160 3a8210    ld      a,($1082)
0163 e680      and     $80
0165 28f2      jr      z,$0159          ; (-$0e)
0167 3a8210    ld      a,($1082)
016a f640      or      $40
016c 328210    ld      ($1082),a
016f 97        sub     a
0170 328110    ld      ($1081),a
0173 c9        ret     

0174 3e7f      ld      a,$7f
0176 329410    ld      ($1094),a
0179 3e03      ld      a,$03
017b 329c10    ld      ($109c),a
017e 3a0000    ld      a,($0000)
0181 320d10    ld      ($100d),a
0184 c9        ret     

0185 ed4b0810  ld      bc,($1008)
0189 3e7f      ld      a,$7f
018b 329410    ld      ($1094),a
018e 3e02      ld      a,$02
0190 329c10    ld      ($109c),a
0193 ed78      in      a,(c)
0195 320d10    ld      ($100d),a
0198 cd0600    call    $0006
019b 2eee      ld      l,$ee
019d cd3700    call    $0037
01a0 c9        ret     

01a1 ed4b0810  ld      bc,($1008)
01a5 3e7f      ld      a,$7f
01a7 329410    ld      ($1094),a
01aa 3e07      ld      a,$07
01ac 329c10    ld      ($109c),a
01af 3a0d10    ld      a,($100d)
01b2 ed79      out     (c),a
01b4 cd0600    call    $0006
01b7 cd5c00    call    $005c
01ba 2eed      ld      l,$ed
01bc cd3700    call    $0037
01bf c9        ret     

01c0 3e7f      ld      a,$7f
01c2 329410    ld      ($1094),a
01c5 3e06      ld      a,$06
01c7 329c10    ld      ($109c),a
01ca 2a0810    ld      hl,($1008)
01cd 7e        ld      a,(hl)
01ce 320d10    ld      ($100d),a
01d1 cd0600    call    $0006
01d4 2ef6      ld      l,$f6
01d6 cd3700    call    $0037
01d9 c9        ret     

01da 3e7f      ld      a,$7f
01dc 329410    ld      ($1094),a
01df 3e0b      ld      a,$0b
01e1 329c10    ld      ($109c),a
01e4 2a0810    ld      hl,($1008)
01e7 3a0d10    ld      a,($100d)
01ea 77        ld      (hl),a
01eb cd0600    call    $0006
01ee cd5c00    call    $005c
01f1 2ef5      ld      l,$f5
01f3 cd3700    call    $0037
01f6 c9        ret     

01f7 2a0a10    ld      hl,($100a)
01fa 7d        ld      a,l
01fb e601      and     $01
01fd 6f        ld      l,a
01fe 7c        ld      a,h
01ff e600      and     $00
0201 67        ld      h,a
0202 b5        or      l
0203 2805      jr      z,$020a          ; (+$05)
0205 cd8501    call    $0185
0208 1814      jr      $021e            ; (+$14)
020a 3a0a10    ld      a,($100a)
020d e602      and     $02
020f 280a      jr      z,$021b          ; (+$0a)
0211 cd7401    call    $0174
0214 ed57      ld      a,i
0216 320d10    ld      ($100d),a
0219 1803      jr      $021e            ; (+$03)
021b cdc001    call    $01c0
021e c9        ret     

021f 2a0a10    ld      hl,($100a)
0222 7d        ld      a,l
0223 e601      and     $01
0225 6f        ld      l,a
0226 7c        ld      a,h
0227 e600      and     $00
0229 67        ld      h,a
022a b5        or      l
022b 2805      jr      z,$0232          ; (+$05)
022d cda101    call    $01a1
0230 1817      jr      $0249            ; (+$17)
0232 3a0a10    ld      a,($100a)
0235 e602      and     $02
0237 280d      jr      z,$0246          ; (+$0d)
0239 3a0d10    ld      a,($100d)
023c ed47      ld      i,a
023e 321810    ld      ($1018),a
0241 cd7401    call    $0174
0244 1803      jr      $0249            ; (+$03)
0246 cdda01    call    $01da
0249 c9        ret     

024a 3a8210    ld      a,($1082)
024d 6f        ld      l,a
024e e5        push    hl
024f 7d        ld      a,l
0250 e6f8      and     $f8
0252 f630      or      $30
0254 6f        ld      l,a
0255 3a0c10    ld      a,($100c)
0258 e603      and     $03
025a 4f        ld      c,a
025b b5        or      l
025c 6f        ld      l,a
025d 7d        ld      a,l
025e 328210    ld      ($1082),a
0261 cd7401    call    $0174
0264 3a0050    ld      a,($5000)
0267 e680      and     $80
0269 2804      jr      z,$026f          ; (+$04)
026b 0e01      ld      c,$01
026d 1802      jr      $0271            ; (+$02)
026f 0e00      ld      c,$00
0271 c5        push    bc
0272 3a0050    ld      a,($5000)
0275 e640      and     $40
0277 2804      jr      z,$027d          ; (+$04)
0279 0e02      ld      c,$02
027b 1802      jr      $027f            ; (+$02)
027d 0e00      ld      c,$00
027f e1        pop     hl
0280 7d        ld      a,l
0281 b1        or      c
0282 6f        ld      l,a
0283 3a0c10    ld      a,($100c)
0286 4f        ld      c,a
0287 ad        xor     l
0288 e603      and     $03
028a 6f        ld      l,a
028b 3a1310    ld      a,($1013)
028e b5        or      l
028f 321310    ld      ($1013),a
0292 c1        pop     bc
0293 79        ld      a,c
0294 328210    ld      ($1082),a
0297 c9        ret     

0298 5a        ld      e,d
0299 3830      jr      c,$02cb          ; (+$30)
029b 2020      jr      nz,$02bd         ; (+$20)
029d 2028      jr      nz,$02c7         ; (+$28)
029f 02        ld      (bc),a
02a0 00        nop     
02a1 00        nop     
02a2 00        nop     
02a3 00        nop     
02a4 00        nop     
02a5 00        nop     
02a6 ff        rst     $38
02a7 ff        rst     $38
02a8 00        nop     
02a9 010000    ld      bc,$0000
02ac 00        nop     
02ad 01ffff    ld      bc,$ffff
02b0 00        nop     
02b1 00        nop     
02b2 ff        rst     $38
02b3 ff        rst     $38
02b4 00        nop     
02b5 00        nop     
02b6 00        nop     
02b7 00        nop     
02b8 00        nop     
02b9 00        nop     
02ba 08        ex      af,af'
02bb 3042      jr      nc,$02ff         ; (+$42)
02bd 55        ld      d,l
02be 53        ld      d,e
02bf 52        ld      d,d
02c0 51        ld      d,c
02c1 2057      jr      nz,$031a         ; (+$57)
02c3 41        ld      b,c
02c4 49        ld      c,c
02c5 54        ld      d,h
02c6 2020      jr      nz,$02e8         ; (+$20)
02c8 5e        ld      e,(hl)
02c9 cd1606    call    $0616
02cc 21f5ff    ld      hl,$fff5
02cf 39        add     hl,sp
02d0 f9        ld      sp,hl
02d1 3eff      ld      a,$ff
02d3 328210    ld      ($1082),a
02d6 3e7f      ld      a,$7f
02d8 328310    ld      ($1083),a
02db 3eff      ld      a,$ff
02dd 321510    ld      ($1015),a
02e0 3a1610    ld      a,($1016)
02e3 fe55      cp      $55
02e5 2815      jr      z,$02fc          ; (+$15)
02e7 3a1710    ld      a,($1017)
02ea feaa      cp      $aa
02ec 280e      jr      z,$02fc          ; (+$0e)
02ee 3e55      ld      a,$55
02f0 321610    ld      ($1016),a
02f3 3eaa      ld      a,$aa
02f5 321710    ld      ($1017),a
02f8 97        sub     a
02f9 321810    ld      ($1018),a
02fc 3a1810    ld      a,($1018)
02ff ed47      ld      i,a
0301 97        sub     a
0302 320a10    ld      ($100a),a
0305 320b10    ld      ($100b),a
0308 320810    ld      ($1008),a
030b 320910    ld      ($1009),a
030e 320010    ld      ($1000),a
0311 320110    ld      ($1001),a
0314 321310    ld      ($1013),a
0317 320610    ld      ($1006),a
031a 321010    ld      ($1010),a
031d dde5      push    ix
031f c1        pop     bc
0320 21f5ff    ld      hl,$fff5
0323 09        add     hl,bc
0324 cd6d00    call    $006d
0327 dd7ef5    ld      a,(ix-$0b)
032a feab      cp      $ab
032c 2802      jr      z,$0330          ; (+$02)
032e 18fe      jr      $032e            ; (-$02)
0330 dd36f900  ld      (ix-$07),$00
0334 dd7ef9    ld      a,(ix-$07)
0337 5f        ld      e,a
0338 87        add     a,a
0339 9f        sbc     a,a
033a 57        ld      d,a
033b 7b        ld      a,e
033c d631      sub     $31
033e 7a        ld      a,d
033f de00      sbc     a,$00
0341 f25d03    jp      p,$035d
0344 dd6ef9    ld      l,(ix-$07)
0347 e5        push    hl
0348 dd34f9    inc     (ix-$07)
034b e1        pop     hl
034c 7d        ld      a,l
034d 4f        ld      c,a
034e 87        add     a,a
034f 9f        sbc     a,a
0350 47        ld      b,a
0351 69        ld      l,c
0352 60        ld      h,b
0353 019802    ld      bc,$0298
0356 09        add     hl,bc
0357 6e        ld      l,(hl)
0358 cd3a01    call    $013a
035b 18d7      jr      $0334            ; (-$29)
035d cd7401    call    $0174
0360 cd9e00    call    $009e
0363 210410    ld      hl,$1004
0366 cd6d00    call    $006d
0369 97        sub     a
036a 328410    ld      ($1084),a
036d 3a0410    ld      a,($1004)
0370 e601      and     $01
0372 280f      jr      z,$0383          ; (+$0f)
0374 3a0410    ld      a,($1004)
0377 e680      and     $80
0379 2812      jr      z,$038d          ; (+$12)
037b 210b10    ld      hl,$100b
037e cd6d00    call    $006d
0381 180a      jr      $038d            ; (+$0a)
0383 3a0410    ld      a,($1004)
0386 e6f0      and     $f0
0388 caca04    jp      z,$04ca
038b 18fe      jr      $038b            ; (-$02)
038d 3a0410    ld      a,($1004)
0390 e640      and     $40
0392 2806      jr      z,$039a          ; (+$06)
0394 210a10    ld      hl,$100a
0397 cd6d00    call    $006d
039a 3a0410    ld      a,($1004)
039d e620      and     $20
039f 2806      jr      z,$03a7          ; (+$06)
03a1 210910    ld      hl,$1009
03a4 cd6d00    call    $006d
03a7 3a0410    ld      a,($1004)
03aa e610      and     $10
03ac 2806      jr      z,$03b4          ; (+$06)
03ae 210810    ld      hl,$1008
03b1 cd6d00    call    $006d
03b4 210a10    ld      hl,$100a
03b7 3e01      ld      a,$01
03b9 96        sub     (hl)
03ba 3e00      ld      a,$00
03bc 23        inc     hl
03bd 9e        sbc     a,(hl)
03be 3018      jr      nc,$03d8         ; (+$18)
03c0 3a0a10    ld      a,($100a)
03c3 fe02      cp      $02
03c5 2005      jr      nz,$03cc         ; (+$05)
03c7 3a0b10    ld      a,($100b)
03ca fe00      cp      $00
03cc c2fb03    jp      nz,$03fb
03cf 210810    ld      hl,$1008
03d2 7e        ld      a,(hl)
03d3 23        inc     hl
03d4 b6        or      (hl)
03d5 c2fb03    jp      nz,$03fb
03d8 3a0410    ld      a,($1004)
03db e602      and     $02
03dd ca0604    jp      z,$0406
03e0 210d10    ld      hl,$100d
03e3 cd6d00    call    $006d
03e6 cd1f02    call    $021f
03e9 3a0410    ld      a,($1004)
03ec e604      and     $04
03ee ca4804    jp      z,$0448
03f1 3a0410    ld      a,($1004)
03f4 e608      and     $08
03f6 ca5104    jp      z,$0451
03f9 18fe      jr      $03f9            ; (-$02)
03fb 3a1010    ld      a,($1010)
03fe f620      or      $20
0400 321010    ld      ($1010),a
0403 c3d803    jp      $03d8
0406 3a0410    ld      a,($1004)
0409 e604      and     $04
040b ca5e04    jp      z,$045e
040e 3a0410    ld      a,($1004)
0411 e608      and     $08
0413 ca8c04    jp      z,$048c
0416 97        sub     a
0417 320d10    ld      ($100d),a
041a cd1f02    call    $021f
041d cd7401    call    $0174
0420 cdf701    call    $01f7
0423 3a0d10    ld      a,($100d)
0426 320510    ld      ($1005),a
0429 3eff      ld      a,$ff
042b 320d10    ld      ($100d),a
042e cd1f02    call    $021f
0431 cd7401    call    $0174
0434 cdf701    call    $01f7
0437 3a0d10    ld      a,($100d)
043a 2f        cpl     
043b 6f        ld      l,a
043c 3a0510    ld      a,($1005)
043f 4f        ld      c,a
0440 b5        or      l
0441 6f        ld      l,a
0442 cd3a01    call    $013a
0445 c36003    jp      $0360
0448 3a0410    ld      a,($1004)
044b e608      and     $08
044d 280c      jr      z,$045b          ; (+$0c)
044f 18fe      jr      $044f            ; (-$02)
0451 3a0610    ld      a,($1006)
0454 6f        ld      l,a
0455 cd3a01    call    $013a
0458 c36003    jp      $0360
045b c36003    jp      $0360
045e 3a0410    ld      a,($1004)
0461 e608      and     $08
0463 ca9904    jp      z,$0499
0466 3a1010    ld      a,($1010)
0469 e6df      and     $df
046b 321010    ld      ($1010),a
046e cdc001    call    $01c0
0471 2e00      ld      l,$00
0473 cd3a01    call    $013a
0476 2e00      ld      l,$00
0478 cd3a01    call    $013a
047b 3a0110    ld      a,($1001)
047e 6f        ld      l,a
047f cd3a01    call    $013a
0482 3a0010    ld      a,($1000)
0485 6f        ld      l,a
0486 cd3a01    call    $013a
0489 c36003    jp      $0360
048c cdf701    call    $01f7
048f 3a0d10    ld      a,($100d)
0492 6f        ld      l,a
0493 cd3a01    call    $013a
0496 c36003    jp      $0360
0499 210a10    ld      hl,$100a
049c 7e        ld      a,(hl)
049d 23        inc     hl
049e b6        or      (hl)
049f 2808      jr      z,$04a9          ; (+$08)
04a1 3a1010    ld      a,($1010)
04a4 f620      or      $20
04a6 321010    ld      ($1010),a
04a9 cd7401    call    $0174
04ac cd9e00    call    $009e
04af 3e7f      ld      a,$7f
04b1 329410    ld      ($1094),a
04b4 3e19      ld      a,$19
04b6 329c10    ld      ($109c),a
04b9 3a8210    ld      a,($1082)
04bc e6c7      and     $c7
04be 328210    ld      ($1082),a
04c1 2a0810    ld      hl,($1008)
04c4 cd1f06    call    $061f
04c7 c36003    jp      $0360
04ca 3a0410    ld      a,($1004)
04cd e602      and     $02
04cf 281c      jr      z,$04ed          ; (+$1c)
04d1 dde5      push    ix
04d3 c1        pop     bc
04d4 21f5ff    ld      hl,$fff5
04d7 09        add     hl,bc
04d8 cd6d00    call    $006d
04db 3a0410    ld      a,($1004)
04de e604      and     $04
04e0 ca4205    jp      z,$0542
04e3 3a0410    ld      a,($1004)
04e6 e608      and     $08
04e8 ca5605    jp      z,$0556
04eb 18fe      jr      $04eb            ; (-$02)
04ed 3a0410    ld      a,($1004)
04f0 e604      and     $04
04f2 cab205    jp      z,$05b2
04f5 3a0410    ld      a,($1004)
04f8 e608      and     $08
04fa cace05    jp      z,$05ce
04fd 2e00      ld      l,$00
04ff cd3a01    call    $013a
0502 2e00      ld      l,$00
0504 cd3a01    call    $013a
0507 3a0310    ld      a,($1003)
050a 6f        ld      l,a
050b cd3a01    call    $013a
050e 3a0210    ld      a,($1002)
0511 6f        ld      l,a
0512 cd3a01    call    $013a
0515 2e00      ld      l,$00
0517 cd3a01    call    $013a
051a 3a1410    ld      a,($1014)
051d 6f        ld      l,a
051e cd3a01    call    $013a
0521 2e00      ld      l,$00
0523 cd3a01    call    $013a
0526 3a0f10    ld      a,($100f)
0529 ee5f      xor     $5f
052b 6f        ld      l,a
052c 3a1510    ld      a,($1015)
052f 4f        ld      c,a
0530 a5        and     l
0531 6f        ld      l,a
0532 cd3a01    call    $013a
0535 3a0710    ld      a,($1007)
0538 6f        ld      l,a
0539 cd3a01    call    $013a
053c cd7401    call    $0174
053f c36003    jp      $0360
0542 3a0410    ld      a,($1004)
0545 e608      and     $08
0547 caac05    jp      z,$05ac
054a dd7ef5    ld      a,(ix-$0b)
054d 320c10    ld      ($100c),a
0550 cd4a02    call    $024a
0553 c36003    jp      $0360
0556 3a0f10    ld      a,($100f)
0559 e640      and     $40
055b 280a      jr      z,$0567          ; (+$0a)
055d dd6ef5    ld      l,(ix-$0b)
0560 7d        ld      a,l
0561 e6cf      and     $cf
0563 2802      jr      z,$0567          ; (+$02)
0565 18fe      jr      $0565            ; (-$02)
0567 3a8210    ld      a,($1082)
056a e6cf      and     $cf
056c 6f        ld      l,a
056d dd4ef5    ld      c,(ix-$0b)
0570 79        ld      a,c
0571 2f        cpl     
0572 e630      and     $30
0574 4f        ld      c,a
0575 b5        or      l
0576 6f        ld      l,a
0577 7d        ld      a,l
0578 328210    ld      ($1082),a
057b dd4ef5    ld      c,(ix-$0b)
057e 97        sub     a
057f 47        ld      b,a
0580 c5        push    bc
0581 210300    ld      hl,$0003
0584 e5        push    hl
0585 cd4506    call    $0645
0588 e1        pop     hl
0589 7d        ld      a,l
058a e602      and     $02
058c 5f        ld      e,a
058d d5        push    de
058e dd4ef5    ld      c,(ix-$0b)
0591 97        sub     a
0592 47        ld      b,a
0593 c5        push    bc
0594 210500    ld      hl,$0005
0597 e5        push    hl
0598 cd4506    call    $0645
059b e1        pop     hl
059c 5d        ld      e,l
059d e1        pop     hl
059e 7d        ld      a,l
059f b3        or      e
05a0 2f        cpl     
05a1 6f        ld      l,a
05a2 7d        ld      a,l
05a3 321510    ld      ($1015),a
05a6 cd7401    call    $0174
05a9 c36003    jp      $0360
05ac cd7401    call    $0174
05af c36003    jp      $0360
05b2 3a0410    ld      a,($1004)
05b5 e608      and     $08
05b7 ca1406    jp      z,$0614
05ba 2e00      ld      l,$00
05bc cd3a01    call    $013a
05bf 3a0f10    ld      a,($100f)
05c2 e6bf      and     $bf
05c4 6f        ld      l,a
05c5 cd3a01    call    $013a
05c8 cd7401    call    $0174
05cb c36003    jp      $0360
05ce 2a0810    ld      hl,($1008)
05d1 221110    ld      ($1011),hl
05d4 97        sub     a
05d5 320810    ld      ($1008),a
05d8 320910    ld      ($1009),a
05db 2e00      ld      l,$00
05dd cd3a01    call    $013a
05e0 cdc001    call    $01c0
05e3 cdda01    call    $01da
05e6 cd8501    call    $0185
05e9 cda101    call    $01a1
05ec 97        sub     a
05ed 320c10    ld      ($100c),a
05f0 3a0c10    ld      a,($100c)
05f3 fe04      cp      $04
05f5 300d      jr      nc,$0604         ; (+$0d)
05f7 cd4a02    call    $024a
05fa 3a0c10    ld      a,($100c)
05fd c601      add     a,$01
05ff 320c10    ld      ($100c),a
0602 18ec      jr      $05f0            ; (-$14)
0604 3a1310    ld      a,($1013)
0607 6f        ld      l,a
0608 cd3a01    call    $013a
060b 2a1110    ld      hl,($1011)
060e 220810    ld      ($1008),hl
0611 c36003    jp      $0360
0614 18fe      jr      $0614            ; (-$02)
0616 e1        pop     hl
0617 dde5      push    ix
0619 dd210000  ld      ix,$0000
061d dd39      add     ix,sp
061f e9        jp      (hl)
0620 ddf9      ld      sp,ix
0622 dde1      pop     ix
0624 c9        ret     

0625 e5        push    hl
0626 c5        push    bc
0627 210600    ld      hl,$0006
062a 39        add     hl,sp
062b 7e        ld      a,(hl)
062c b7        or      a
062d f23506    jp      p,$0635
0630 2f        cpl     
0631 3c        inc     a
0632 c35506    jp      $0655
0635 ca9406    jp      z,$0694
0638 47        ld      b,a
0639 23        inc     hl
063a 23        inc     hl
063b 7e        ld      a,(hl)
063c 23        inc     hl
063d 66        ld      h,(hl)
063e 6f        ld      l,a
063f 29        add     hl,hl
0640 10fd      djnz    $063f            ; (-$03)
0642 c38806    jp      $0688
0645 e5        push    hl
0646 c5        push    bc
0647 210600    ld      hl,$0006
064a 39        add     hl,sp
064b 7e        ld      a,(hl)
064c b7        or      a
064d f25506    jp      p,$0655
0650 2f        cpl     
0651 3c        inc     a
0652 c33506    jp      $0635
0655 ca9406    jp      z,$0694
0658 47        ld      b,a
0659 23        inc     hl
065a 23        inc     hl
065b 7e        ld      a,(hl)
065c 23        inc     hl
065d 66        ld      h,(hl)
065e 6f        ld      l,a
065f cb2c      sra     h
0661 cb1d      rr      l
0663 10fa      djnz    $065f            ; (-$06)
0665 c38806    jp      $0688
0668 e5        push    hl
0669 c5        push    bc
066a 210600    ld      hl,$0006
066d 39        add     hl,sp
066e 7e        ld      a,(hl)
066f b7        or      a
0670 f27806    jp      p,$0678
0673 2f        cpl     
0674 3c        inc     a
0675 c33506    jp      $0635
0678 ca9406    jp      z,$0694
067b 47        ld      b,a
067c 23        inc     hl
067d 23        inc     hl
067e 7e        ld      a,(hl)
067f 23        inc     hl
0680 66        ld      h,(hl)
0681 6f        ld      l,a
0682 cb3c      srl     h
0684 cb1d      rr      l
0686 10fa      djnz    $0682            ; (-$06)
0688 4d        ld      c,l
0689 44        ld      b,h
068a 210800    ld      hl,$0008
068d 39        add     hl,sp
068e 71        ld      (hl),c
068f 23        inc     hl
0690 70        ld      (hl),b
0691 c39406    jp      $0694
0694 210400    ld      hl,$0004
0697 39        add     hl,sp
0698 4e        ld      c,(hl)
0699 23        inc     hl
069a 46        ld      b,(hl)
069b 23        inc     hl
069c 71        ld      (hl),c
069d 23        inc     hl
069e 70        ld      (hl),b
069f c1        pop     bc
06a0 e1        pop     hl
06a1 f1        pop     af
06a2 c9        ret     

06a3 f5        push    af
06a4 210600    ld      hl,$0006
06a7 39        add     hl,sp
06a8 4e        ld      c,(hl)
06a9 23        inc     hl
06aa 46        ld      b,(hl)
06ab 23        inc     hl
06ac 23        inc     hl
06ad 23        inc     hl
06ae 71        ld      (hl),c
06af 23        inc     hl
06b0 70        ld      (hl),b
06b1 c1        pop     bc
06b2 2b        dec     hl
06b3 2b        dec     hl
06b4 2b        dec     hl
06b5 71        ld      (hl),c
06b6 c1        pop     bc
06b7 e1        pop     hl
06b8 f1        pop     af
06b9 f1        pop     af
06ba c9        ret     

06bb ff        rst     $38
06bc ff        rst     $38
06bd ff        rst     $38
06be ff        rst     $38
06bf ff        rst     $38
06c0 ff        rst     $38
06c1 ff        rst     $38
06c2 ff        rst     $38
06c3 ff        rst     $38
06c4 ff        rst     $38
06c5 ff        rst     $38
06c6 ff        rst     $38
06c7 ff        rst     $38
06c8 ff        rst     $38
06c9 ff        rst     $38
06ca ff        rst     $38
06cb ff        rst     $38
06cc ff        rst     $38
06cd ff        rst     $38
06ce ff        rst     $38
06cf ff        rst     $38
06d0 ff        rst     $38
06d1 ff        rst     $38
06d2 ff        rst     $38
06d3 ff        rst     $38
06d4 ff        rst     $38
06d5 ff        rst     $38
06d6 ff        rst     $38
06d7 ff        rst     $38
06d8 ff        rst     $38
06d9 ff        rst     $38
06da ff        rst     $38
06db ff        rst     $38
06dc ff        rst     $38
06dd ff        rst     $38
06de ff        rst     $38
06df ff        rst     $38
06e0 ff        rst     $38
06e1 ff        rst     $38
06e2 ff        rst     $38
06e3 ff        rst     $38
06e4 ff        rst     $38
06e5 ff        rst     $38
06e6 ff        rst     $38
06e7 ff        rst     $38
06e8 ff        rst     $38
06e9 ff        rst     $38
06ea ff        rst     $38
06eb ff        rst     $38
06ec ff        rst     $38
06ed ff        rst     $38
06ee ff        rst     $38
06ef ff        rst     $38
06f0 ff        rst     $38
06f1 ff        rst     $38
06f2 ff        rst     $38
06f3 ff        rst     $38
06f4 ff        rst     $38
06f5 ff        rst     $38
06f6 ff        rst     $38
06f7 ff        rst     $38
06f8 ff        rst     $38
06f9 ff        rst     $38
06fa ff        rst     $38
06fb ff        rst     $38
06fc ff        rst     $38
06fd ff        rst     $38
06fe ff        rst     $38
06ff ff        rst     $38
0700 ff        rst     $38
0701 ff        rst     $38
0702 ff        rst     $38
0703 ff        rst     $38
0704 ff        rst     $38
0705 ff        rst     $38
0706 ff        rst     $38
0707 ff        rst     $38
0708 ff        rst     $38
0709 ff        rst     $38
070a ff        rst     $38
070b ff        rst     $38
070c ff        rst     $38
070d ff        rst     $38
070e ff        rst     $38
070f ff        rst     $38
0710 ff        rst     $38
0711 ff        rst     $38
0712 ff        rst     $38
0713 ff        rst     $38
0714 ff        rst     $38
0715 ff        rst     $38
0716 ff        rst     $38
0717 ff        rst     $38
0718 ff        rst     $38
0719 ff        rst     $38
071a ff        rst     $38
071b ff        rst     $38
071c ff        rst     $38
071d ff        rst     $38
071e ff        rst     $38
071f ff        rst     $38
0720 ff        rst     $38
0721 ff        rst     $38
0722 ff        rst     $38
0723 ff        rst     $38
0724 ff        rst     $38
0725 ff        rst     $38
0726 ff        rst     $38
0727 ff        rst     $38
0728 ff        rst     $38
0729 ff        rst     $38
072a ff        rst     $38
072b ff        rst     $38
072c ff        rst     $38
072d ff        rst     $38
072e ff        rst     $38
072f ff        rst     $38
0730 ff        rst     $38
0731 ff        rst     $38
0732 ff        rst     $38
0733 ff        rst     $38
0734 ff        rst     $38
0735 ff        rst     $38
0736 ff        rst     $38
0737 ff        rst     $38
0738 ff        rst     $38
0739 ff        rst     $38
073a ff        rst     $38
073b ff        rst     $38
073c ff        rst     $38
073d ff        rst     $38
073e ff        rst     $38
073f ff        rst     $38
0740 ff        rst     $38
0741 ff        rst     $38
0742 ff        rst     $38
0743 ff        rst     $38
0744 ff        rst     $38
0745 ff        rst     $38
0746 ff        rst     $38
0747 ff        rst     $38
0748 ff        rst     $38
0749 ff        rst     $38
074a ff        rst     $38
074b ff        rst     $38
074c ff        rst     $38
074d ff        rst     $38
074e ff        rst     $38
074f ff        rst     $38
0750 ff        rst     $38
0751 ff        rst     $38
0752 ff        rst     $38
0753 ff        rst     $38
0754 ff        rst     $38
0755 ff        rst     $38
0756 ff        rst     $38
0757 ff        rst     $38
0758 ff        rst     $38
0759 ff        rst     $38
075a ff        rst     $38
075b ff        rst     $38
075c ff        rst     $38
075d ff        rst     $38
075e ff        rst     $38
075f ff        rst     $38
0760 ff        rst     $38
0761 ff        rst     $38
0762 ff        rst     $38
0763 ff        rst     $38
0764 ff        rst     $38
0765 ff        rst     $38
0766 ff        rst     $38
0767 ff        rst     $38
0768 ff        rst     $38
0769 ff        rst     $38
076a ff        rst     $38
076b ff        rst     $38
076c ff        rst     $38
076d ff        rst     $38
076e ff        rst     $38
076f ff        rst     $38
0770 ff        rst     $38
0771 ff        rst     $38
0772 ff        rst     $38
0773 ff        rst     $38
0774 ff        rst     $38
0775 ff        rst     $38
0776 ff        rst     $38
0777 ff        rst     $38
0778 ff        rst     $38
0779 ff        rst     $38
077a ff        rst     $38
077b ff        rst     $38
077c ff        rst     $38
077d ff        rst     $38
077e ff        rst     $38
077f ff        rst     $38
0780 ff        rst     $38
0781 ff        rst     $38
0782 ff        rst     $38
0783 ff        rst     $38
0784 ff        rst     $38
0785 ff        rst     $38
0786 ff        rst     $38
0787 ff        rst     $38
0788 ff        rst     $38
0789 ff        rst     $38
078a ff        rst     $38
078b ff        rst     $38
078c ff        rst     $38
078d ff        rst     $38
078e ff        rst     $38
078f ff        rst     $38
0790 ff        rst     $38
0791 ff        rst     $38
0792 ff        rst     $38
0793 ff        rst     $38
0794 ff        rst     $38
0795 ff        rst     $38
0796 ff        rst     $38
0797 ff        rst     $38
0798 ff        rst     $38
0799 ff        rst     $38
079a ff        rst     $38
079b ff        rst     $38
079c ff        rst     $38
079d ff        rst     $38
079e ff        rst     $38
079f ff        rst     $38
07a0 ff        rst     $38
07a1 ff        rst     $38
07a2 ff        rst     $38
07a3 ff        rst     $38
07a4 ff        rst     $38
07a5 ff        rst     $38
07a6 ff        rst     $38
07a7 ff        rst     $38
07a8 ff        rst     $38
07a9 ff        rst     $38
07aa ff        rst     $38
07ab ff        rst     $38
07ac ff        rst     $38
07ad ff        rst     $38
07ae ff        rst     $38
07af ff        rst     $38
07b0 ff        rst     $38
07b1 ff        rst     $38
07b2 ff        rst     $38
07b3 ff        rst     $38
07b4 ff        rst     $38
07b5 ff        rst     $38
07b6 ff        rst     $38
07b7 ff        rst     $38
07b8 ff        rst     $38
07b9 ff        rst     $38
07ba ff        rst     $38
07bb ff        rst     $38
07bc ff        rst     $38
07bd ff        rst     $38
07be ff        rst     $38
07bf ff        rst     $38
07c0 ff        rst     $38
07c1 ff        rst     $38
07c2 ff        rst     $38
07c3 ff        rst     $38
07c4 ff        rst     $38
07c5 ff        rst     $38
07c6 ff        rst     $38
07c7 ff        rst     $38
07c8 ff        rst     $38
07c9 ff        rst     $38
07ca ff        rst     $38
07cb ff        rst     $38
07cc ff        rst     $38
07cd ff        rst     $38
07ce ff        rst     $38
07cf ff        rst     $38
07d0 ff        rst     $38
07d1 ff        rst     $38
07d2 ff        rst     $38
07d3 ff        rst     $38
07d4 ff        rst     $38
07d5 ff        rst     $38
07d6 ff        rst     $38
07d7 ff        rst     $38
07d8 ff        rst     $38
07d9 ff        rst     $38
07da ff        rst     $38
07db ff        rst     $38
07dc ff        rst     $38
07dd ff        rst     $38
07de ff        rst     $38
07df ff        rst     $38
07e0 ff        rst     $38
07e1 ff        rst     $38
07e2 ff        rst     $38
07e3 ff        rst     $38
07e4 ff        rst     $38
07e5 ff        rst     $38
07e6 ff        rst     $38
07e7 ff        rst     $38
07e8 ff        rst     $38
07e9 ff        rst     $38
07ea ff        rst     $38
07eb ff        rst     $38
07ec ff        rst     $38
07ed ff        rst     $38
07ee ff        rst     $38
07ef ff        rst     $38
07f0 ff        rst     $38
07f1 ff        rst     $38
07f2 ff        rst     $38
07f3 ff        rst     $38
07f4 ff        rst     $38
07f5 ff        rst     $38
07f6 ff        rst     $38
07f7 ff        rst     $38
07f8 ff        rst     $38
07f9 ff        rst     $38
07fa ff        rst     $38
07fb ff        rst     $38
07fc ff        rst     $38
07fd ff        rst     $38
07fe ff        rst     $38
07ff ff        rst     $38
